package com.yuchen.ishop.entity;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Table;

import java.beans.Transient;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 商品
 */
@Table("t_goods")
public class Goods implements Serializable {
    @Id
    private Long id;

    @Column("seller_id")
    private Long sellerId;

    @Column("seller_xiaoer_id")
    private Long xiaoerId;

    @Column("buyer_id")
    private Long buyerId;

    @Column("name")
    private String name;

    @Column("dictionary_id")
    private Long dictionaryId;

    @Column("goods_type_id")
    private Long goodsTypeId;

    @Column("brands_id")
    private Long brandsId;

    @Column("price")
    private Double price;

    @Column("publish_state")
    private Long publishState;

    @Column("auto_publish_time")
    private Long autoPublishTime;

    @Column("auto_under_time")
    private Long autoUnderTime;

    @Column("tag_names")
    private String tagNames;

    @Column("create_time")
    private Timestamp createTime;

    @Column("update_time")
    private Timestamp updateTime;

    //审核状态：0未通过，1通过
    @Column("state")
    private Long state;

    @Column("main_img")
    private String mainImg;

    @Column("remark")
    private String remark;

    @Column
    private Short recommend;

    @Column("refresh")
    private Long refresh;

    @Column("refresh_time")
    private Timestamp refreshTime;

    private String content;

    private String imgIds;

    private GoodsHouse house;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSellerId() {
        return sellerId;
    }

    public void setSellerId(Long sellerId) {
        this.sellerId = sellerId;
    }

    public Long getXiaoerId() {
        return xiaoerId;
    }

    public void setXiaoerId(Long xiaoerId) {
        this.xiaoerId = xiaoerId;
    }

    public Long getBuyerId() {
        return buyerId;
    }

    public void setBuyerId(Long buyerId) {
        this.buyerId = buyerId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getDictionaryId() {
        return dictionaryId;
    }

    public void setDictionaryId(Long dictionaryId) {
        this.dictionaryId = dictionaryId;
    }

    public Long getGoodsTypeId() {
        return goodsTypeId;
    }

    public void setGoodsTypeId(Long goodsTypeId) {
        this.goodsTypeId = goodsTypeId;
    }

    public Long getBrandsId() {
        return brandsId;
    }

    public void setBrandsId(Long brandsId) {
        this.brandsId = brandsId;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Long getPublishState() {
        return publishState;
    }

    public void setPublishState(Long publishState) {
        this.publishState = publishState;
    }

    public Long getAutoPublishTime() {
        return autoPublishTime;
    }

    public void setAutoPublishTime(Long autoPublishTime) {
        this.autoPublishTime = autoPublishTime;
    }

    public Long getAutoUnderTime() {
        return autoUnderTime;
    }

    public void setAutoUnderTime(Long autoUnderTime) {
        this.autoUnderTime = autoUnderTime;
    }

    public String getTagNames() {
        return tagNames;
    }

    public void setTagNames(String tagNames) {
        this.tagNames = tagNames;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    public Long getState() {
        return state;
    }

    public void setState(Long state) {
        this.state = state;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Short getRecommend() {
        return recommend;
    }

    public void setRecommend(Short recommend) {
        this.recommend = recommend;
    }

    @Transient
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Transient
    public String getImgIds() {
        return imgIds;
    }

    public void setImgIds(String imgIds) {
        this.imgIds = imgIds;
    }

    @Transient
    public GoodsHouse getHouse() {
        return house;
    }

    public void setHouse(GoodsHouse house) {
        this.house = house;
    }

    public String getMainImg() {
        return mainImg;
    }

    public void setMainImg(String mainImg) {
        this.mainImg = mainImg;
    }

    public Long getRefresh() {
        return refresh;
    }

    public void setRefresh(Long refresh) {
        this.refresh = refresh;
    }

    public Timestamp getRefreshTime() {
        return refreshTime;
    }

    public void setRefreshTime(Timestamp refreshTime) {
        this.refreshTime = refreshTime;
    }
}
